<template>
  <van-swipe :autoplay="3000">
    <van-swipe-item v-for="(image, index) in images" :key="index">
      <img width="100%" :src="image.imgUrl" />
    </van-swipe-item>
  </van-swipe>
</template>

<script>
  import Vue from 'vue';

  import {
    Swipe,
    SwipeItem
  } from 'vant';

  Vue.use(Swipe).use(SwipeItem);
  export default {
    data() {
      return {
        images: [
          {imgUrl:'/static/imgs/timg1.jpg'},
          {imgUrl:'/static/imgs/timg2.jpg'},
          {imgUrl:'/static/imgs/timg3.jpg'},
          {imgUrl:'/static/imgs/timg4.jpg'},
          {imgUrl:'/static/imgs/timg5.jpg'},
          {imgUrl:'/static/imgs/timg6.jpg'},
        ]
      }
    }
  }

</script>

<style>
   &-swipe {
    img {
      width: 7.5rem;
      height: 7.5rem;
      display: block;
    }
  }
</style>
